<?php $dbdhys=dr_site_value('dbdhys');$dbwzys=dr_site_value('dbwzys');?>
{php $duoquans = \Phpcmf\Service::M()->db->table('1_quan_shezhi')->where('dirname', 'quan')->get()->getRowArray();}
{php $duoquan = dr_string2array($duoquans['setting']);}
{php $danquanid = $duoquan['pages']['quan_id'];}
{php $danquanhaibao = $duoquan['pages']['quan_haibao'];}
{php $danquanfabu = $duoquan['pages']['quan_fabu'];}
{php $quanzuobian = $duoquan['pages']['quan_zuobian'];}
{php $quandingbu = $duoquan['pages']['quan_dingbu'];}
{php $quanliebiao = $duoquan['pages']['quan_liebiao'];}
{php $duoquan = $duoquan['pages']['quan_moshi'];}
<div class="d-kuan d-neikuang-30 navbar-fixed-top d-beijing-baise d-toububeijing {if $_GET['s'] == 'huiyuan' || $_GET['s'] == 'wenda'} d-yincang {/if}">
	<div class="row d-gao-60">
	    <div class="col-md-3 col-xs-2 d-wenzi-zuobian d-yincang d-shangxian-juzhong d-gao-60 ">
	        <a href="{SITE_URL}"><img src="{SITE_LOGO}"  height="35" class="d-shang-10"></a>
	    </div>
	    <div class="col-md-3 col-xs-2 d-wenzi-zuobian d-yincang-pc d-shangxian-juzhong d-gao-60">
	        <a href="{SITE_URL}"><img src="{SITE_LOGOICO}" width="38" height="38" class=" d-shang-10"></a>
	    </div>
		
		<div class="col-md-6 col-xs-8 d-wenzi-juzhong d-gao-60">
		    {if $quandingbu == 0}
		    	<!--导航-->
		    	<div class="d-quxian-0 pull-left d-yincang d-shang-15">
		    		<a href="{CLIENT_URL}" class="d-shangxian-juzhong d-wenzi-juzhong " {if $dbwzys}style="color: {$dbwzys};"{else}style="color: #2c2c2c;" {/if}>
		    			<div class="d-zuoyou-10 d-wenzi-18 {if $indexc} d-jiacu activea jiacu{/if}" >
		    				首页
		    			</div>
		    			
		    		</a>
		    	</div>
				{if $duoquan == 1}
				<div class="d-quxian-0 pull-left d-yincang d-shang-15">
					<a href="{dr_url('quan/show/index', ['id'=>$danquanid])}" class="d-shangxian-juzhong d-wenzi-juzhong " {if $dbwzys}style="color: {$dbwzys};"{else}style="color: #2c2c2c;" {/if}>
						<div class="d-zuoyou-10 d-wenzi-18 {if $_GET['s']=='quan'} d-jiacu activea jiacu{/if}" >
							社区
						</div>
					</a>
				</div>
				{/if}
		    	{module module=daohang order=inputtime_asc fstatus=1 catid=1 page=1 pagesize=7 return=t}
		    		<div class="d-quxian-0 pull-left d-yincang d-shang-15">
		    			<a {if $dbwzys}style="color: {$dbwzys};"{else}style="color: #2c2c2c;" {/if} {if $t.tzwz} href="{$t.tzwz}" {else} href="{dr_url($t.zmmc.'/home/index')}"{/if} {if $t.tiaozhuan == 1} target="_blank" {/if} class="d-shangxian-juzhong d-wenzi-juzhong ">
		    				<div class="d-zuoyou-10 d-wenzi-18 {if $_GET['s'] == $t.zmmc } d-jiacu activea jiacu{/if}">
		    					<span {if $t.yanse}style="color: {$t.yanse};"{/if} >{$t.title}</span>
		    				</div>
		    			</a>
		    		</div>
		    	{/module}
		    
		    <div class=" d-gao-60 d-quxian-0 pull-right col-lg-3 col-md-5 col-xs-12">
		    	<form class="search-form-0" action="{SITE_MURL}index.php" method="get">
		    		<input type="hidden" name="s" value="quan">
		    		<input type="hidden" name="c" value="sou">
		    		<input type="hidden" name="m" value="index">
		    	<div class="input-group d-shang-12">
		    		<input type="text" class="form-control-ding d-yuanjiao-zuo-20-20" placeholder="搜索..." name='k' value='{$_GET['k']}' id='search_keyword'>
		    		<span class="input-group-btn ">
		    			<button class="btn d-yuanjiao-you-20-20 d-beijing-hui-f3" style="line-height: 20px;width: 40px;" onclick="dr_post_comment('search_keyword')" type="submit">
		    				<i class="fa fa-search"></i>
		    			</button>
		    		</span>
		    	</div>
		    	</form>
		    </div>
		    {/if}
		    {if $quandingbu == 2}
		    	<div class=" d-gao-60 d-quxian-0 col-lg-12 col-md-12 col-xs-12">
		    		<form class="search-form-0" action="{SITE_MURL}index.php" method="get">
		    			<input type="hidden" name="s" value="quan">
		    			<input type="hidden" name="c" value="sou">
		    			<input type="hidden" name="m" value="index">
		    		<div class="input-group d-shang-12">
		    			<input type="text" class="form-control-ding d-yuanjiao-zuo-20-20" placeholder="搜索..." name='k' value='{$_GET['k']}' id='search_keyword'>
		    			<span class="input-group-btn ">
		    				<button class="btn d-yuanjiao-you-20-20 d-beijing-hui-f3" style="line-height: 20px;width: 40px;" type="submit" onclick="dr_post_comment('search_keyword')">
		    					<i class="fa fa-search"></i>
		    				</button>
		    			</span>
		    		</div>
		    		</form>
		    	</div>
		    {/if}
		    <script>
		        // 这段js是用来执行搜索的
		        function dr_post_comment(name) {
		            var value = $("#"+name).val();
		            if (value) {
		                
		            } else {
		    			$("#"+name).focus()
		    			dr_cmf_tips(0, "请输入关键词");
		    		}
		            return false;
		        }
		    </script>
	    </div>
		<div class="col-md-3 col-xs-2 d-wenzi-youbian d-gao-60 d-yincang-pc ">
			<span class="d-shang-10 pull-right ">
				<a href="{SITE_URL}index.php?s=member&app=notice" class="d-buhuanhang">
					{if $member}
					    {if dr_is_app('notice')}
							{count action=table table=member_notice uid=$member.uid isnew=1 return=xiaoxi}
							{if $xiaoxi_count > 0}
								
									<span class="badge d-beijing-chengse dr_notice_num d-shang-10">0</span>
									<script>
										$('.dr_notice_num').html("{count action=table table=member_notice uid=$member.uid isnew=1}");
									</script>
								
							{/if}
						{else}
							<span class="badge d-beijing-chengse dr_notice_num d-shang-10">0</span>
						{/if}
					{/if}
				    <img src="{HOME_THEME_PATH}quan/img/xiaoxi3.png" width="38" height="38" class="">
					
				</a>
			</span>
		</div>
	    <div class="col-md-3 col-xs-2 d-wenzi-youbian d-gao-60 d-yincang ">
			{if $member}
				<span class="d-shang-12 pull-right  d-xiala">
					<a href="{SITE_URL}index.php?s=member" class="d-yuanjiao-50">
					    <img src="{$member.avatar}" width="38" height="38" class="d-yuanjiao-50">
					</a>
					<div class="d-xiala-ji">
						<div class="d-xiala-ji-0 d-quxian-0 ">
							<a class="d-wenzi-16 d-hanggao-30" href="{d_huiyuan_url($member.id)}">
								<i class="bi bi-award"></i> 个人主页
							</a>
							<a class="d-wenzi-16 d-hanggao-30" href="{SITE_URL}index.php?s=member">
								<i class="bi bi-person"></i> 会员中心
							</a>
							<a class="d-hanggao-30" href="javascript:;" onclick="dr_loginout()">
								<i class=" bi bi-box-arrow-right"></i> 退出
							</a>
						</div>
						<div class="d-clear"></div>
					</div>
				</span>
				<span class="d-shang-12 pull-right d-zuoyou-20 d-quxian-0">
					<a href="{SITE_URL}index.php?s=member&app=notice">
					    <img src="{HOME_THEME_PATH}quan/img/xiaoxi3.png" width="38" height="38" class="">
						{if $member}
							{if dr_is_app('notice')}
								{count action=table table=member_notice uid=$member.uid isnew=1 return=xiaoxi}
								{if $xiaoxi_count > 0}
										<span class="badge d-beijing-chengse dr_notice_num">0</span>
										<script>
											$('.dr_notice_num').html("{count action=table table=member_notice uid=$member.uid isnew=1}");
										</script>
								{/if}
							{/if}
						{/if}
						
					</a>
					
				</span>
				<span class="d-shang-12 pull-right ">
					<a href="{dr_member_url('quan/son/add', ['tid'=>'','cid'=>$danquanid])}" class="d-yuanjiao-50">
					    <img src="{HOME_THEME_PATH}quan/img/fabu2.png" width="38" height="38" class="d-yuanjiao-50">
					</a>
				</span>
				<!--span class="d-shang-12 pull-right">
					<a>
						<div class="d-neikuang-8-20 d-beijing-hei d-yuanjiao-20 pull-right d-zitiyanse-bai">发布</div>
					</a>
					
					
				</span-->
			{else}
			    {if dr_is_app('notice')}
					{if isset($ci->member_cache['oauth']['weixins']['id'])}
						<div class="d-shang-12">
							<a target="_blank" href="{Router::oauth_url('weixin', 'login')}">
								<div class="d-neikuang-8-20 d-beijing-hei d-yuanjiao-20 pull-right d-zitiyanse-bai"><i class="fa fa-wechat"></i> 登 录</div>
							</a>
						</div>
					{else}
						<div class="d-shang-12">
							<a href="{dr_member_url("login/index", ["back" => urlencode($my_web_url)])}">
								<div class="d-neikuang-8-20 d-beijing-hei d-yuanjiao-20 pull-right d-zitiyanse-bai">登 录</div>
							</a>
						</div>
						{if isset($ci->member_cache['oauth']['qq']['id']) && $ci->member_cache['oauth']['qq']['id']}
						<div class="d-shang-12 ">
							<a href="{Router::oauth_url('qq', 'login')}" class="d-yuanjiao-50">
							    <img src="{HOME_THEME_PATH}web/img/qq.png" width="38" height="38" class="d-yuanjiao-50 d-you-10">
							</a>
						</div>
						{/if}
					{/if}
				{else}
				    
					<div class="d-shang-12">
						<a href="{dr_member_url("login/index", ["back" => urlencode($my_web_url)])}">
							<div class="d-neikuang-8-20 d-beijing-hei d-yuanjiao-20 pull-right d-zitiyanse-bai">登 录</div>
						</a>
					</div>
				{/if}
			{/if}
			
		</div>
	</div>
</div>



<style>
	.d-toububeijing {
		background-color: #ffffff;
		box-shadow: 0 6px 14px 0 rgba(227,233,237,.35);
	}
	{if $duoquan == 1}
	@media screen and (max-width: 990px) { /*当屏幕尺寸小于1200px时，应用下面的CSS样式*/
		.d-toububeijing {
			background-color: #ffffff;
			box-shadow: 0 6px 14px 0 rgba(255, 255, 255, 1.0);
		}
	}
	
	{/if}

</style>